Skip to content

Do proper clean-up of tmp directories #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Do proper clean-up of tmp directories #146

merged 1 commit into from
Jan 3, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jan 2, 2023

Please check if the PR fulfills these requirements

What kind of change does this PR introduce?
Do proper cleanup of temporary folders.

What is the current behavior?
Temp directories are not removed after receiving the shutdown message, see #145 for details

What is the new behavior?
The shutdown message is now properly handled and the temp directories are removed.

Other information:
Partially resolve #145

@cmaglie cmaglie self-assigned this Jan 2, 2023
@per1234 per1234 added the topic: code Related to content of the project itself label Jan 3, 2023
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified this results in the clean up of the Arduino CLI build folders (arduino-language-servernnnnnnnnn).

The system-includes-nnnnn.clangd files are still left behind. Do you have any ideas about that @cmaglie?

It seems likely these are produced by clangd, but I didn't find any complaints about the files in their issue tracker. I do see people complained about the preamble-nnnnnn.pch files not being cleaned up, so I would expect them to do the same if the more common applications of clangd resulted in zillions of these system-includes-nnnnn.clangd files as happens when using Arduino IDE. This made me think maybe there is something about how Arduino Language Server or Arduino IDE is using clangd that causes them to not be cleaned up.

Anyway, it is perfectly fine if this PR is scoped solely to the clean up of the Arduino CLI sketch build folders, so I wouldn't want the subject of the system-includes-nnnnn.clangd files to block the merge, but we should also consider whether this PR can be considered to fully fix #145

Thanks Cristian!

@cmaglie cmaglie merged commit 63dac5e into main Jan 3, 2023
@cmaglie cmaglie mentioned this pull request Jan 3, 2023
3 tasks
@cmaglie cmaglie deleted the tmp_cleanup branch January 3, 2023 08:29
@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Temporary files are not cleaned up
2 participants